---
title: Billing router
description: An overview of the Billing router
---

## Procedures

The billing router has the following procedures:

### Get available billing plans

Returns the available billing plans that can be subscribed to.

- Access: `@public`

```typescript
// Client components
const { data } = api.billing.plans.useQuery()

// Server components
const data = await api.billing.plans()
```

### Get the billing account

Returns the billing account, containing the billing email and current subscription.

- Access: `@admin`

```typescript
// Client components
const { data } = api.billing.account.useQuery()

// Server components
const data = await api.billing.account()
```

### Update the billing account

Updates the billing email of the account and syncs the data with the billing provider (Stripe).

- Access: `@admin`

```typescript
// Client components
const { mutate } = api.billing.updateBillingDetails.useMutation()
mutate({
  input: {
    email: '',
  },
})

// Server components
const data = await api.billing.updateBillingDetails({
  input: {
    email: '',
  },
})
```
